<%-- 
    Document   : updatePassword
    Created on : 2012-3-20, 23:58:33
    Author     : Administrator
--%>

<%@page import="main_com.pojo.LoginBean" %>
<%@page import="java.util.ArrayList" %>
<%@page contentType="text/html" pageEncoding="UTF-8" %>
<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>JSP Page</title>
    <style>
        body {
            background-color: #E0EFFF;
            font-family: Arial, sans-serif;
            margin: 0;
            padding: 0;
        }

        .header {
            background-color: #383838;
            color: white;
            padding: 10px 0;
            text-align: center;
        }

        a {
            text-decoration: none; /* 去掉下划线 */
        }

        .nav {
            display: flex;
            justify-content: space-around;
            background-color: #444;
            padding: 10px 0;
        }

        .nav a {
            color: white;
            text-decoration: none;
            font-weight: bold;
        }

        .nav a:hover {
            color: #95BDFF;
        }

        .content {
            padding: 20px;
            background-color: #FFF;
            margin: 20px auto;
            width: 60%;
            border-radius: 10px;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
        }

        table {
            width: 100%;
            border-collapse: collapse;
        }

        table, th, td {
            border: 1px solid #95BDFF;
        }

        th, td {
            padding: 10px;
            text-align: left;
        }

        th {
            background-color: #95BDFF;
            color: white;
        }

        tr:nth-child(even) {
            background-color: #F2F2F2;
        }

        tr:hover {
            background-color: #D1E2FF;
        }
    </style>
</head>

<body>
<div class="header">
    <h1>个人信息管理系统</h1>
</div>
<div class="nav">
    <a href="http://localhost/lookMessage/updateMessage.jsp">修改个人信息</a>
    <a href="http://localhost/lookMessage/lookMessage.jsp">查看个人信息</a>
    <a href="#">修改密码</a>
</div>
<div class="content">
    <form action="http://localhost/UpdatePasswordController/updatePassword" method="post" accept-charset="UTF-8">
        <table>
            <tr>
                <th>字段</th>
                <th>信息</th>
            </tr>
            <%
                ArrayList login = (ArrayList) session.getAttribute("login");
                if (login == null || login.size() == 0) {
                    response.sendRedirect("http://localhost/main/bottom.jsp");
                } else {
                    for (int i = login.size() - 1; i >= 0; i--) {
                        LoginBean nn = (LoginBean) login.get(i);
            %>
            <tr>
                <td height="30">用户密码</td>
                <td><label>
                    <input type="password" name="password1" value="<%=nn.getPassword()%>">
                </label></td>
            </tr>
            <tr>
                <td height="30">重复密码</td>
                <td><label>
                    <input type="password" name="password2" value="<%=nn.getPassword()%>">
                </label></td>
            </tr>
            <tr>
                <td align="center">
                    <input type="submit" value="确 定" size="12">
                </td>
                <td>
                    <input type="reset" value="重 置" size="12">
                </td>
            </tr>
            <%
                    }
                }
            %>
        </table>
    </form>
</div>
</body>
</html>
